package com.cn.jiyun.service.impl;



import com.cn.jiyun.HotelFeignClient;
import com.cn.jiyun.entity.pojo.Hotel;
import com.cn.jiyun.entity.pojo.Room;
import com.cn.jiyun.entity.vo.HotelVO;
import com.cn.jiyun.service.IHotelService;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 针对表【-Hotel】的业务操作的Service实现类
 *
 * @author lxy
 * @since 2025-01-17
 */
@Service
public class HotelServiceImpl implements IHotelService {
    @Autowired
    private HotelFeignClient hotelFeignClient;


    @Override
    public List<Hotel> findAllList(HotelVO hotelVo) {
        return hotelFeignClient.getList(hotelVo).getData();
    }

    @Override
    public Hotel getHotelId(Integer hotelId) {
        return  hotelFeignClient.findById(hotelId).getData();
    }

    @Override
    public Room getRoomId(Integer roomId) {
        return hotelFeignClient.findRoomById(roomId).getData();
    }

    @Override
    public List<Room> selectRoom(Room room) {
        return hotelFeignClient.selectRoom(room).getData();
    }
}
